﻿using RuPeng.HystrixCore;
using System;
using System.Collections.Generic;
using System.Text;

namespace Summer.IService
{
    public interface IProductService
    {
        [HystrixCommand(nameof(GetAllProductsFallBackAsync),
               EnableCircuitBreaker = true, CacheTTLMilliseconds = 1000 * 6,
               ExceptionsAllowedBeforeBreaking = 2,
               MillisecondsOfBreak = 1000 * 6)]
        string GetAllProductsAsync(string productType);

        string GetAllProductsFallBackAsync(string productType);
    }
}
